<?php
class Visitor extends Base{
	protected $id;
	protected $name;
	protected $visitTime; 		//访问时间
	protected $ipAddress;			//IP地址
	protected $address;			//推断地址
	protected $macAddress;		//电脑mac地址
	protected $type;				//匿名或实名或昵称登录等
	protected $actions;			//访问动向 访问感兴趣的影片等连接点击
	protected $searchStrings;	//查询字符串
	protected $authority;			//权限 包括1，2，3，4...20
	protected $comeFrom;			//用户来源 如百度搜索，sina微薄等
	protected $picsShow;			//头像图片链接
	//其他属性...
	function __construct() {
		$this->id=0;
		$this->name="请输入姓名";
		$this->visitTime="2012-04-01";
		$this->ipAddress="202.130.0.1";
		$this->address="中国北京(beijing China)";
		$this->macAddress="0E:0E:0E:0E:0E";
		$this->type="匿名用户";
		$this->actions=array("首页"=>"http://www.vshidian.com","电影"=>"http://vshidian.com/Film");
		$this->authority=0;
		$this->searchString=array("电影"=>"http://www.vshidian.com/Film");
		$this->comeFrom="http://www.vshidian.com";
	}
	public function getGuestMac(){

	}
	public function isNewComer(){
		$db=new DB;
		$db->prepareSQL("select * from vshi_user where email like :name;");
		$db->excuteSQL(array(':name'=>$this->name));
		$row=$db->fetch();
		$name=$row['id'];
		if (isset($name)) {
			return false;
		}
		else {
			return true;
		}

	}

}